package com.andy.common.entity;

import java.util.List;

/**
 * Created by Yuli_Yan on 2017/9/4.
 */
public class Configuration {

    private String targetSchema;
    private String sourcePath;
    private List<Schema> schema;
    private Connect connect;

    public List<Schema> getSchema() {
        return schema;
    }

    public void setSchema(List<Schema> schema) {
        this.schema = schema;
    }

    public Connect getConnect() {
        return connect;
    }

    public void setConnect(Connect connect) {
        this.connect = connect;
    }

    public String getSourcePath() {
        return sourcePath;
    }

    public void setSourcePath(String sourcePath) {
        this.sourcePath = sourcePath;
    }

    public Schema getSchemaByName(String name) {
        for (Schema schemas : schema) {
            if (schemas.getName().equals(name)) {
                return schemas;
            }

        }
        return null;
    }

    public String getTargetSchema() {
        return targetSchema;
    }

    public void setTargetSchema(String targetSchema) {
        this.targetSchema = targetSchema;
    }
}
